//
//  SocketIOClientSpec.h
//  Socket.IO-Client
//
//  Created by alanwang.dev on 16/8/8.
//  Copyright © 2016年 com.alanwang.dev. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SocketPacket.h"

@protocol SocketIOClientSpecProtocol <NSObject>

@optional
@property (nonatomic, copy) NSString *nsp;
@property (nonatomic, strong) NSMutableArray<SocketPacket *> *waitingPackets;
- (void)didConnect;
- (void)didDisconnect:(NSString *)string;
- (void)didError:(NSString *)reason;
- (void)handleAck:(NSInteger)ack data:(NSArray *)data;
- (void)handleEvent:(NSString *)event data:(NSArray *)data isInternalMessage:(BOOL)isInternalMessage ack:(NSInteger)ack;
- (void)joinNamespace:(NSString *)Namespace;

@end

@interface SocketIOClientSpec : NSObject <SocketIOClientSpecProtocol>
@property (nonatomic, copy) NSString *nsp;
// extension SocketIOClientSpec
- (void)didError:(NSString *)reason;

@end
